{\rtf1\ansi\ansicpg936\cocoartf1404\cocoasubrtf470
{\fonttbl\f0\fnil\fcharset134 STHeitiSC-Light;\f1\fnil\fcharset0 Tahoma;\f2\fnil\fcharset134 PingFangSC-Regular;
\f3\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;\red52\green52\blue52;\red217\green11\blue0;\red29\green133\blue25;
\red77\green0\blue158;\red46\green13\blue110;\red180\green0\blue98;\red92\green38\blue153;\red0\green11\blue255;
\red164\green8\blue0;\red186\green0\blue17;\red110\green32\blue13;\red48\green111\blue121;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\paperw11900\paperh16840\margl1440\margr1440\vieww25100\viewh16980\viewkind0
\deftab1204
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0

\f0\fs60 \cf0 \CocoaLigature0 \'ca\'d6\'ca\'c6\
\pard\pardeftab720\partightenfactor0

\f1\b\fs32 \cf2 \expnd0\expndtw0\kerning0
\CocoaLigature1 \'a0\
\pard\tx220\tx720\pardeftab720\li720\fi-720\partightenfactor0
\ls1\ilvl0
\b0\fs24 \cf2 \kerning1\expnd0\expndtw0 {\listtext	\'95	}\expnd0\expndtw0\kerning0
tap
\f2 \'a3\'ba\'c7\'e1\'b4\'a5
\f1 \
\ls1\ilvl0\kerning1\expnd0\expndtw0 {\listtext	\'95	}\expnd0\expndtw0\kerning0
long press
\f2 \'a3\'ba\'d4\'da\'d2\'bb\'b5\'e3\'c9\'cf\'b3\'a4\'b0\'b4
\f1 \
\ls1\ilvl0\kerning1\expnd0\expndtw0 {\listtext	\'95	}\expnd0\expndtw0\kerning0
pinch
\f2 \'a3\'ba\'c1\'bd\'b8\'f6\'d6\'b8\'cd\'b7\'c4\'f3\'bb\'f2\'d5\'df\'b7\'c5\'b5\'c4\'b2\'d9\'d7\'f7
\f1 \
\ls1\ilvl0\kerning1\expnd0\expndtw0 {\listtext	\'95	}\expnd0\expndtw0\kerning0
pan
\f2 \'a3\'ba\'ca\'d6\'d6\'b8\'b5\'c4\'cd\'cf\'b6\'af
\f1 \
\ls1\ilvl0\kerning1\expnd0\expndtw0 {\listtext	\'95	}\expnd0\expndtw0\kerning0
swipe
\f2 \'a3\'ba\'ca\'d6\'d6\'b8\'d4\'da\'c6\'c1\'c4\'bb\'c9\'cf\'ba\'dc\'bf\'ec\'b5\'c4\'bb\'ac\'b6\'af
\f1 \
\ls1\ilvl0\kerning1\expnd0\expndtw0 {\listtext	\'95	}\expnd0\expndtw0\kerning0
rotation
\f2 \'a3\'ba\'ca\'d6\'d6\'b8\'b7\'b4\'cf\'f2\'b2\'d9\'d7\'f7
\f0\fs60 \cf0 \kerning1\expnd0\expndtw0 \CocoaLigature0 \
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf3 \'b5\'e3\'bb\'f7\'ca\'d6\'ca\'c6
\f3\fs50 \cf0 \
    \cf4 //
\f0 \'c8\'e7\'b9\'fb\'b2\'bb\'c9\'e8\'d6\'c3
\f3 numberOfTapsRequired
\f0 \'a1\'a2
\f3 numberOfTouchesRequired
\f0 \'d5\'e2\'c1\'bd\'b8\'f6\'ca\'f4\'d0\'d4\'a3\'ac\'c4\'ac\'c8\'cf\'ce\'aa\'b5\'a5\'d6\'b8\'b5\'a5\'bb\'f7\'ca\'d6\'ca\'c6
\f3 \cf0 \
    \cf5 UITapGestureRecognizer\cf0  * tapOne = [[\cf5 UITapGestureRecognizer\cf0  \cf6 alloc\cf0 ] \cf6 initWithTarget\cf0 :\cf7 self\cf0  \cf6 action\cf0 :\cf7 @selector\cf0 (tapOne:)] ;\
    \cf4 //
\f0 \'c9\'e8\'d6\'c3\'b5\'e3\'bb\'f7\'b4\'ce\'ca\'fd
\f3 \cf0 \
\cf4 //    tapOne.numberOfTapsRequired = 1 ;\cf0 \
\cf4 //    //
\f0 \'c9\'e8\'d6\'c3\'b5\'e3\'bb\'f7\'b5\'c4\'ca\'d6\'d6\'b8\'ca\'fd
\f3 \cf0 \
\cf4 //    tapOne.numberOfTouchesRequired = 1 ;\cf0 \
    [redView \cf6 addGestureRecognizer\cf0 :tapOne] ; \
\cf4 //
\f0 \'cb\'ab\'bb\'f7\'ca\'d6\'ca\'c6
\f3 \cf0 \
    \cf5 UITapGestureRecognizer\cf0  * tapTwo = [[\cf5 UITapGestureRecognizer\cf0  \cf6 alloc\cf0 ] \cf6 initWithTarget\cf0 :\cf7 self\cf0  \cf6 action\cf0 :\cf7 @selector\cf0 (tapTwo:)] ;\
    tapTwo.\cf8 numberOfTapsRequired\cf0  = \cf9 2\cf0  ;\
    tapTwo.\cf8 numberOfTouchesRequired\cf0  = \cf9 1\cf0  ;\
    [redView \cf6 addGestureRecognizer\cf0 :tapTwo] ;\
\cf3 //
\f0 \'c8\'e7\'b9\'fb\'cb\'ab\'bb\'f7\'ca\'d6\'ca\'c6\'d6\'b4\'d0\'d0\'ca\'a7\'b0\'dc\'be\'cd\'d6\'b4\'d0\'d0\'b5\'a5\'bb\'f7\'ca\'d6\'ca\'c6
\f3 \cf0 \
    [tapOne \cf6 requireGestureRecognizerToFail\cf0 :tapTwo] ;\
 \
- (\cf7 void\cf0 )tapOne:(\cf5 UITapGestureRecognizer\cf0  *)tap\
\{\
\cf4 	\cf10 tap.view  
\f0 \'cd\'a8\'b9\'fd\'d5\'e2\'b8\'f6\'ca\'f4\'d0\'d4\'bf\'c9\'d2\'d4\'c4\'c3\'b5\'bd\'cc\'ed\'bc\'d3\'b5\'c4\'ca\'d6\'ca\'c6\'ca\'d3\'cd\'bc
\f3 \cf0 \
    \cf5 UIView\cf0  * view = tap.\cf8 view\cf0  ;\
\cf4 	view.frame = self.view.frame ;\
//
\f0 \'bb\'f1\'b5\'c3\'b5\'b1\'c7\'b0\'ca\'d6\'ca\'c6\'b5\'e3\'bb\'f7\'b5\'c4\'d7\'f8\'b1\'ea
\f3 \cf0 \
    \cf8 CGPoint\cf0  point = [tap \cf6 locationInView\cf0 :view] ;\
    \cf6 NSLog\cf0 (\cf11 @"
\f0 \'ba\'ec\'c9\'ab\'ca\'d3\'cd\'bc\'b1\'bb\'b5\'e3\'bb\'f7
\f3 ---%f--%f"\cf0 ,point.\cf8 x\cf0 ,point.\cf8 y\cf0 ) ;\
\}\
\
- (\cf7 void\cf0 )tapTwo:(\cf5 UITapGestureRecognizer\cf0  *)tap\
\{\
    \cf5 UIView\cf0  * view = tap.\cf8 view\cf0  ;\
    view.\cf8 frame\cf0  = \cf6 CGRectMake\cf0 (\cf9 40\cf0 , \cf9 100\cf0 , \cf9 100\cf0 , \cf9 100\cf0 ) ;\
    \cf6 NSLog\cf0 (\cf11 @"
\f0 \'cb\'ab\'bb\'f7
\f3 "\cf0 ) ;\
\}\
\

\f0\fs60 \cf3 \'b3\'a4\'b0\'b4\'ca\'d6\'ca\'c6
\f3\fs50 \cf0 \
    \cf5 UILongPressGestureRecognizer\cf0  * longPress = [[\cf5 UILongPressGestureRecognizer\cf0  \cf6 alloc\cf0 ] \cf6 initWithTarget\cf0 :\cf7 self\cf0  \cf6 action\cf0 :\cf7 @selector\cf0 (pressLong:)] ;\
    \cf4 //
\f0 \'c9\'e8\'d6\'c3\'b3\'a4\'b0\'b4\'b5\'c4\'d7\'ee\'b6\'cc\'ca\'b1\'bc\'e4
\f3 (
\f0 \'b6\'e0\'c9\'d9\'c3\'eb\'d6\'ae\'ba\'f3\'b4\'a5\'b7\'a2\'ca\'c2\'bc\'fe
\f3 )\cf0 \
    longPress.\cf8 minimumPressDuration\cf0  = \cf9 2.0\cf0  ;\
    [imageV \cf6 addGestureRecognizer\cf0 :longPress] ;\
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf12 #pragma mark -- 
\f0 \'b3\'a4\'b0\'b4\'ca\'d6\'ca\'c6
\f3 \
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf0 - (\cf7 void\cf0 )pressLong:(\cf5 UILongPressGestureRecognizer\cf0  *)longPress\
\{\
    \cf4 //
\f0 \'c5\'d0\'b6\'cf\'b3\'a4\'b0\'b4\'ca\'d6\'ca\'c6\'b4\'a5\'b7\'a2\'b5\'c4\'ca\'b1\'bb\'fa
\f3 \cf0 \
    \cf7 if\cf0  (longPress.\cf8 state\cf0  == \cf6 UIGestureRecognizerStateBegan\cf0 )\
    \{\
        \cf5 UIActionSheet\cf0  * actionSheet = [[\cf5 UIActionSheet\cf0  \cf6 alloc\cf0 ] \cf6 initWithTitle\cf0 :\cf11 @"
\f0 \'cc\'e1\'ca\'be
\f3 "\cf0  \cf6 delegate\cf0 :\cf7 self\cf0  \cf6 cancelButtonTitle\cf0 :\cf11 @"
\f0 \'c8\'a1\'cf\'fb
\f3 "\cf0  \cf6 destructiveButtonTitle\cf0 :\cf11 @"
\f0 \'c0\'bc\'b2\'a9
\f3 "\cf0  \cf6 otherButtonTitles\cf0 :\cf11 @"
\f0 \'b1\'a3\'b4\'e6\'b5\'bd\'cf\'e0\'b2\'e1
\f3 "\cf0 , \cf7 nil\cf0 ] ;\
        [actionSheet \cf6 showInView\cf0 :\cf7 self\cf0 .\cf8 view\cf0 ] ;\
    \}\
\}\
- (\cf7 void\cf0 )actionSheet:(\cf5 UIActionSheet\cf0  *)actionSheet clickedButtonAtIndex:(\cf8 NSInteger\cf0 )buttonIndex\
\{\
    \cf7 if\cf0  (buttonIndex == \cf9 1\cf0 )\
    \{\
        \cf4 //
\f0 \'bd\'ab\'cf\'e0\'c6\'ac\'b1\'a3\'b4\'e6\'b5\'bd\'cf\'e0\'b2\'e1\
		\'d2\'aa\'d7\'f1\'ca\'d8\'d0\'ad\'d2\'e9\

\f3 \cf7 		\cf4 //\cf7 @interface\cf0  \cf13 RootViewController\cf0  ()<\cf5 UIActionSheetDelegate\cf0 >\
        \cf6 UIImageWriteToSavedPhotosAlbum\cf0 ([\cf5 UIImage\cf0  \cf6 imageNamed\cf0 :\cf11 @"mn2.jpg"\cf0 ], \cf7 nil\cf0 , \cf7 nil\cf0 , \cf7 nil\cf0 ) ;\
    \}\
\}\
\

\f0\fs60 \cf3 \'bb\'ac\'b6\'af\'ca\'d6\'ca\'c6
\f3\fs50 \cf0 \
\cf5 	UISwipeGestureRecognizer\cf0  * swipe = [[\cf5 UISwipeGestureRecognizer\cf0  \cf6 alloc\cf0 ] \cf6 initWithTarget\cf0 :\cf7 self\cf0  \cf6 action\cf0 :\cf7 @selector\cf0 (swipe:)] ;\
    swipe.\cf8 direction\cf0  = \cf6 UISwipeGestureRecognizerDirectionLeft\cf0 ;\
    [imageV \cf6 addGestureRecognizer\cf0 :swipe] ;\
- (\cf7 void\cf0 )swipe:(\cf5 UISwipeGestureRecognizer\cf0  *)swipe\
\{\
    \cf7 if\cf0  (swipe.\cf8 direction\cf0  == \cf6 UISwipeGestureRecognizerDirectionDown\cf0 )\
    \{\
        \cf6 NSLog\cf0 (\cf11 @"
\f0 \'cf\'c2\'bb\'ac
\f3 "\cf0 ) ;\
    \}\
    \cf7 else\cf0  \cf7 if\cf0  (swipe.\cf8 direction\cf0  == \cf6 UISwipeGestureRecognizerDirectionLeft\cf0 )\
    \{\
\cf4 //        
\f0 \'bb\'ac\'b6\'af\'ca\'d6\'ca\'c6\'cd\'c6\'b3\'f6\'cf\'c2\'d2\'bb\'b8\'f6\'bd\'e7\'c3\'e6
\f3 \cf0 \
        \cf13 SecondViewController\cf0  * secondVC = [[\cf13 SecondViewController\cf0  \cf6 alloc\cf0 ] \cf6 init\cf0 ] ;\
        [\cf7 self\cf0 .\cf8 navigationController\cf0  \cf6 pushViewController\cf0 :secondVC \cf6 animated\cf0 :\cf7 YES\cf0 ] ;\
        \cf6 NSLog\cf0 (\cf11 @"
\f0 \'d7\'f3\'bb\'ac
\f3 "\cf0 ) ;\
    \}\
\}\
\
\cf4 /********
\f0 \'bd\'d8\'c8\'a1\'cd\'bc\'c6\'ac\'d6\'d0\'c4\'b3\'d2\'bb\'bf\'e9
\f3 ********/\cf0 \
\cf5 	UIImage\cf0  * image = [\cf5 UIImage\cf0  \cf6 imageNamed\cf0 :\cf11 @"mn2.jpg"\cf0 ] ;\
    \
    \cf5 UIImage\cf0  * smallImage = [\cf5 UIImage\cf0  \cf6 imageWithCGImage\cf0 :\cf6 CGImageCreateWithImageInRect\cf0 (image.\cf8 CGImage\cf0 , \cf6 CGRectMake\cf0 (\cf9 200\cf0 , \cf9 280\cf0 , \cf9 300\cf0 , \cf9 300\cf0 ))];\
    \
    \cf5 UIImageView\cf0  * iView = [[\cf5 UIImageView\cf0  \cf6 alloc\cf0 ] \cf6 initWithFrame\cf0 :\cf6 CGRectMake\cf0 (\cf9 40\cf0 , \cf9 80\cf0 , \cf9 200\cf0 , \cf9 200\cf0 )] ;\
    iView.\cf8 image\cf0  = smallImage ;\
    \
    [\cf7 self\cf0 .\cf8 view\cf0  \cf6 addSubview\cf0 :iView] ;\
\cf4 /*****************************/\cf0 \
\

\f0\fs60 \cf3 \'d2\'c6\'b6\'af\'ca\'d6\'ca\'c6
\f3\fs50 \cf0 \
    \cf5 UIPanGestureRecognizer\cf0  * pan = [[\cf5 UIPanGestureRecognizer\cf0  \cf6 alloc\cf0 ] \cf6 initWithTarget\cf0 :\cf7 self\cf0  \cf6 action\cf0 :\cf7 @selector\cf0 (pan:)] ;\
    [imageView \cf6 addGestureRecognizer\cf0 :pan] ;\
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf12 #pragma mark -- 
\f0 \'d2\'c6\'b6\'af\'ca\'d6\'ca\'c6
\f3 \
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf0 - (\cf7 void\cf0 )pan:(\cf5 UIPanGestureRecognizer\cf0  *)pan\
\{\
    \cf5 UIImageView\cf0  * iView = (\cf7 id\cf0 )pan.\cf8 view\cf0  ;\
    \cf8 CGPoint\cf0  point = [pan \cf6 translationInView\cf0 :\cf7 self\cf0 .\cf8 view\cf0 ] ;\
    iView.\cf8 transform\cf0  = \cf6 CGAffineTransformTranslate\cf0 (iView.\cf8 transform\cf0 , point.\cf8 x\cf0 , point.\cf8 y\cf0 ) ;\
    \cf6 NSLog\cf0 (\cf11 @"%f---%f---"\cf0 ,point.\cf8 x\cf0 ,point.\cf8 y\cf0 ) ;\
    [pan \cf6 setTranslation\cf0 :\cf6 CGPointMake\cf0 (\cf9 0\cf0 , \cf9 0\cf0 ) \cf6 inView\cf0 :\cf7 self\cf0 .\cf8 view\cf0 ] ;\
\}\
\

\f0\fs60 \cf3 \'d0\'fd\'d7\'aa\'ca\'d6\'ca\'c6
\f3\fs50 \cf0 \
    \cf5 UIRotationGestureRecognizer\cf0  * rotation = [[\cf5 UIRotationGestureRecognizer\cf0  \cf6 alloc\cf0 ] \cf6 initWithTarget\cf0 :\cf7 self\cf0  \cf6 action\cf0 :\cf7 @selector\cf0 (rotation:)] ;\
    [imageView \cf6 addGestureRecognizer\cf0 :rotation] ;\
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf12 #pragma mark -- 
\f0 \'d0\'fd\'d7\'aa\'ca\'d6\'ca\'c6
\f3 \
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf0 - (\cf7 void\cf0 )rotation:(\cf5 UIRotationGestureRecognizer\cf0  *)rotation\
\{\
    \cf5 UIImageView\cf0  * iView = (\cf7 id\cf0 )rotaion.\cf8 view\cf0  ;\
    iView.\cf8 transform\cf0  = \cf6 CGAffineTransformRotate\cf0 (iView.\cf8 transform\cf0 , rotaion.\cf8 rotation\cf0 );\
    \cf4 //
\f0 \'c3\'bf\'b4\'ce\'d0\'fd\'d7\'aa\'d6\'ae\'ba\'f3\'bd\'ab\'bd\'c7\'b6\'c8\'c7\'e5\'c1\'e3
\f3    rotation
\f0 \'ca\'c7\'d2\'bb\'b8\'f6\'bd\'c7\'b6\'c8\'d6\'b5
\f3 \cf0 \
    [rotation \cf6 setRotation\cf0 :\cf9 0\cf0 ] ;\
\}\
    \

\f0\fs60 \cf3 \'c4\'f3\'ba\'cf\'ca\'d6\'ca\'c6
\f3\fs50 \cf0 \
    \cf5 UIPinchGestureRecognizer\cf0  * pinch = [[\cf5 UIPinchGestureRecognizer\cf0  \cf6 alloc\cf0 ] \cf6 initWithTarget\cf0 :\cf7 self\cf0  \cf6 action\cf0 :\cf7 @selector\cf0 (pinch:)] ;\
	
\f0 \cf10 \'ca\'d6\'ca\'c6\'b5\'c4\'b4\'fa\'c0\'ed\'c9\'e8\'d6\'c3
\f3 \cf0 \
    pinch.\cf8 delegate\cf0  = \cf7 self\cf0  ;\
\
    [imageView \cf6 addGestureRecognizer\cf0 :pinch] ;\
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf12 #pragma mark -- 
\f0 \'c4\'f3\'ba\'cf\'ca\'d6\'ca\'c6
\f3 \
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0
\cf0 - (\cf7 void\cf0 )pinch:(\cf5 UIPinchGestureRecognizer\cf0  *)pinch\
\{\
    \cf5 UIImageView\cf0  * iView = (\cf7 id\cf0 )pinch.\cf8 view\cf0  ;\
    iView.\cf8 transform\cf0  = \cf6 CGAffineTransformScale\cf0 (iView.\cf8 transform\cf0 , pinch.\cf8 scale\cf0 , pinch.\cf8 scale\cf0 ) ;\
    pinch.\cf8 scale\cf0  = \cf9 1.0\cf0  ;\
\}\
\
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0

\f0\fs60 \cf10 \'c4\'f3\'ba\'cf\'ca\'d6\'ca\'c6\'d3\'eb\'d0\'fd\'d7\'aa\'ca\'d6\'ca\'c6\'bd\'e1\'ba\'cf
\f3 \cf0 \
\pard\tx1204\pardeftab1204\pardirnatural\partightenfactor0

\fs50 \cf7 @interface\cf0  \cf13 ViewController\cf0  ()<\cf5 UIGestureRecognizerDelegate\cf0 >\
- (\cf7 BOOL\cf0 )gestureRecognizer:(\cf5 UIGestureRecognizer\cf0  *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(\cf5 UIGestureRecognizer\cf0  *)otherGestureRecognizer\
\{\
    \cf7 return\cf0  \cf7 YES\cf0  ;\
\}\
\
\
\
\
\
}